package com.wxproject.demo.Mapper;

import com.wxproject.demo.Entity.Model.ArticleDO;
import com.wxproject.demo.Entity.VO.ArticleDetailsVO;
import com.wxproject.demo.Entity.VO.*;
import com.wxproject.demo.Entity.VO.PageArticleVO;
import com.wxproject.demo.Entity.VO.RecommendArticleVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface ArticleMapper {

    List<PageArticleVO> getAllByPage(int start, int size, String typeId);

    List<PageArticleVO> getAllByPageHelper(String typeId);

    List<ArticleDO> getAll();

    Integer look(String articleId);

    Integer like(String articleId);

    Integer dislike(String articleId);

    Integer deleteArticle(String articleId);

    Integer logicDeleteArticle(String articleId);

    String isOwnerOfArticle(String articleId);

    Integer isArticleExists(String articleId);

    Integer getCommentCount(String articleId);

    Integer createArticle(ArticleDO articleDO);

    List<RecommendArticleVO> recommendedArticle(String today);

    ArticleDetailsVO getArticleDetails(String articleId);

    ArticleContextVO getContext(String id);

    List<OneCommentVO> getComment(String id);

    List<PageArticleVO> serchArticles(String key);
}
